class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: E = None
        self.x: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: E = None
        self.s: D = None
        self.w: E = None
        self.txt = txt

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

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

b = A("b")
h = B("h")
e = C("e")
j = D("j")
m = E("m")
g = F("g")
c = C("c")
a = D("a")
f = B("f")
d = B("d")

b.x = j
b.y = m
h.y = d
h.o = m
h.x = f
e.o = c
e.w = j
e.s = d
e.y = d
e.v = a
e.u = m
j.t = m
j.x = m
j.w = m
j.s = a
m.x = b
g.q = b
c.o = e
c.w = j
c.v = j
c.s = h
c.y = d
c.u = m
a.t = m
a.x = m
a.w = m
a.s = j
f.y = h
f.o = m
f.x = d
d.y = f
d.x = f
d.o = m
assert e.o.y.y.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: E = None
        self.x: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: E = None
        self.s: D = None
        self.w: E = None
        self.txt = txt

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

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

b = A("b")
h = B("h")
e = C("e")
j = D("j")
m = E("m")
g = F("g")
c = C("c")
a = D("a")
f = B("f")
d = B("d")

b.x = j
b.y = m
h.y = d
h.o = m
h.x = f
e.o = c
e.w = j
e.s = d
e.y = d
e.v = a
e.u = m
j.t = m
j.x = m
j.w = m
j.s = a
m.x = b
g.q = b
c.o = e
c.w = j
c.v = j
c.s = h
c.y = d
c.u = m
a.t = m
a.x = m
a.w = m
a.s = j
f.y = h
f.o = m
f.x = d
d.y = f
d.x = f
d.o = m
assert e.o.y.y.y.y.txt == "d"