class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: D = None
        self.q: F = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: G = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: G = None
        self.r: B = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: G = None
        self.o: H = None
        self.x: B = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: D = None
        self.x: D = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: D = None
        self.txt = txt

n = A("n")
l = B("l")
g = C("g")
a = D("a")
m = E("m")
i = F("i")
f = G("f")
b = H("b")

n.o = f
n.w = a
n.q = i
n.r = i
l.z = f
g.x = b
g.u = f
g.r = a
a.t = i
a.x = f
a.r = l
a.v = b
m.q = l
m.x = l
m.s = f
m.o = b
m.v = b
i.r = b
i.z = a
i.x = a
i.s = l
f.x = g
b.q = l
b.t = a
assert n.o.x.x.q.txt == "
class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: D = None
        self.q: F = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: G = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: G = None
        self.r: B = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: G = None
        self.o: H = None
        self.x: B = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: D = None
        self.x: D = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: D = None
        self.txt = txt

n = A("n")
l = B("l")
g = C("g")
a = D("a")
m = E("m")
i = F("i")
f = G("f")
b = H("b")

n.o = f
n.w = a
n.q = i
n.r = i
l.z = f
g.x = b
g.u = f
g.r = a
a.t = i
a.x = f
a.r = l
a.v = b
m.q = l
m.x = l
m.s = f
m.o = b
m.v = b
i.r = b
i.z = a
i.x = a
i.s = l
f.x = g
b.q = l
b.t = a
assert n.o.x.x.q.txt == "l"