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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: G = None
        self.r: E = None
        self.v: A = None
        self.x: F = None
        self.t: G = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: G = None
        self.r: E = None
        self.v: A = None
        self.x: F = None
        self.t: G = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: F = None
        self.txt = txt

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

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

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