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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: B = None
        self.s: G = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: B = None
        self.x: E = None
        self.p: D = None
        self.s: F = None
        self.z: D = None
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: B = None
        self.s: G = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: B = None
        self.x: E = None
        self.p: D = None
        self.s: F = None
        self.z: D = None
        self.t: A = None
        self.txt = txt

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

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