class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: H = None
        self.s: H = None
        self.w: F = None
        self.u: A = None
        self.r: A = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: A = None
        self.q: C = None
        self.y: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: C = None
        self.z: D = None
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: H = None
        self.s: H = None
        self.w: F = None
        self.u: A = None
        self.r: A = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: A = None
        self.q: C = None
        self.y: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: C = None
        self.z: D = None
        self.o: F = None
        self.txt = txt

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

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