class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: C = None
        self.w: C = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: E = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: G = None
        self.v: E = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: D = None
        self.w: A = None
        self.z: F = None
        self.q: H = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: F = None
        self.r: F = None
        self.t: C = None
        self.s: C = None
        self.v: C = None
        self.txt = txt

n = A("n")
j = B("j")
f = C("f")
h = D("h")
c = E("c")
m = F("m")
e = G("e")
l = H("l")
g = C("g")

n.q = m
n.v = m
n.o = g
n.w = f
j.t = f
j.u = c
j.z = c
f.x = e
f.o = e
f.v = c
f.u = n
h.s = m
c.o = l
c.q = l
c.v = l
c.p = h
c.w = n
c.z = m
m.q = e
e.o = l
e.x = n
l.w = n
l.p = m
l.r = m
l.t = g
l.v = g
l.s = f
g.x = e
g.o = e
g.v = c
g.u = n
assert c.q.t.v.p.s.q.o.txt == "
class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: C = None
        self.w: C = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: E = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: G = None
        self.v: E = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: D = None
        self.w: A = None
        self.z: F = None
        self.q: H = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: F = None
        self.r: F = None
        self.t: C = None
        self.s: C = None
        self.v: C = None
        self.txt = txt

n = A("n")
j = B("j")
f = C("f")
h = D("h")
c = E("c")
m = F("m")
e = G("e")
l = H("l")
g = C("g")

n.q = m
n.v = m
n.o = g
n.w = f
j.t = f
j.u = c
j.z = c
f.x = e
f.o = e
f.v = c
f.u = n
h.s = m
c.o = l
c.q = l
c.v = l
c.p = h
c.w = n
c.z = m
m.q = e
e.o = l
e.x = n
l.w = n
l.p = m
l.r = m
l.t = g
l.v = g
l.s = f
g.x = e
g.o = e
g.v = c
g.u = n
assert c.q.t.v.p.s.q.o.txt == "l"