class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: D = None
        self.u: A = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: A = None
        self.r: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: A = None
        self.p: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: A = None
        self.r: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: A = None
        self.p: A = None
        self.txt = txt

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

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

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