class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: B = None
        self.r: D = None
        self.o: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: D = None
        self.v: D = None
        self.o: A = None
        self.z: A = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: C = None
        self.p: D = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: D = None
        self.v: D = None
        self.o: A = None
        self.z: A = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: C = None
        self.p: D = None
        self.s: C = None
        self.txt = txt

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

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

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

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